﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="HomePageContent.ascx.cs" Inherits="Parts_HomePageContent" %>

<% 
    List<DanhMuc> lst = (List<DanhMuc>)Session["DanhMucs"];
    
    for(int i = 0; i < lst.Count; i++) 
    {
        List<TaiLieu> lstTL = lst[i].TaiLieus.ToList<TaiLieu>();
        
        if (i % 2 == 0)
        {
            
%>

<div class="document-container-box box box-noborder box-nobackground clearfix">
            <div class="corner tl"></div>
            <div class="corner tr"></div>
            <div class="corner br"></div>
            <div class="corner bl"></div>
            <h3 class="title"><%= lst[i].CatName %></h3>
            <div class="clearfix">
                <a class="slider-button slider-button-left" id="A1"></a>
                <a class="slider-button slider-button-right" id="A2"></a>
                <div class="slider clearfix slider-init" id="Div1">
                    <ul>
                            
<%
    for (int j = 0; j < lstTL.Count; j++)
    {
        if (lstTL[j].State != -1)
        {
%>
<li>
    <a class="slider-item" href="Product.aspx?ID=<%= lstTL[j].ProductID %>" title="<%= lstTL[j].ProductName %>">
        <img src="<%= lstTL[j].ProductPhotoURL %>" alt="<%= lstTL[j].ProductName %>" onload="return '<%= lstTL[j].ProductPhotoURL %>'" class="img-hover-action img-lazy-load" />
    </a>
    <div class="hover-box">
        <span class="preview"><%= lstTL[j].ProductName%></span>
        <span class="author"><a href=""><%= lst[i].DanhMucCha.ParentCatName%></a></span>
        <span class="price"><%= lstTL[j].ProductPrice + " USD"%></span>
    </div>
</li>
<%
        }
    }
%>
					</ul>
                </div>
            </div>
</div>
<% 
        }
        else
        {
%>
<div class="container-box-document-preview box clearfix">
            <div class="corner tl"></div>
            <div class="corner tr"></div>
            <div class="corner br"></div>
            <div class="corner bl"></div>
            <h3 class="title"><%= lst[i].CatName %></h3>
            <div class="clearfix">
                <a class="slider-button slider-button-left" id="sliderSelfHelpBooks_bl"></a>
                <a class="slider-button slider-button-right" id="sliderSelfHelpBooks_br"></a>
                <div class="slider clearfix slider-init" id="sliderSelfHelpBooks">
                    <ul>

<%
    for (int j = 0; j < lstTL.Count; j++)
    {
        if (lstTL[j].State != -1)
        {
%>
<li>
    <a class="slider-item" href="Product.aspx?ID=<%= lstTL[j].ProductID %>" title="<%= lstTL[j].ProductName %>">
        <img src="<%= lstTL[j].ProductPhotoURL %>" alt="<%= lstTL[j].ProductName %>" onload="return '<%= lstTL[j].ProductPhotoURL %>'" class="img-hover-action img-lazy-load" />
    </a>
    <div class="hover-box">
        <span class="preview"><%= lstTL[j].ProductName%></span>
        <span class="author"><a href=""><%= lst[i].DanhMucCha.ParentCatName%></a></span>
        <span class="price"><%= lstTL[j].ProductPrice + " USD"%></span>
    </div>
</li>
<%
        }
    }
%>

					</ul>
                </div>
            </div>
</div>
<%
        }
    } 
%>